package task2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-22
 * Time:14:20
 */
public class ExceptionTest {
    public static void main(String[] args) {
        try {
            throw new ArrayIndexOutOfBoundsException();
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("数组下标不能越界");
        } catch (Exception e) {
            System.out.println("其他异常被触发");
        }finally {
            System.out.println("所有异常被处理");
        }
    }
}
